package com.credit.management.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.credit.management.system.custom.dao.CApproveMapper;
import com.credit.management.system.generator.dao.ApproveMapper;
import com.credit.management.system.jdbc.dao.ApproveDao;
import com.credit.management.system.model.Approve;
import com.credit.management.system.model.Page;
import com.credit.management.system.service.IApproveService;

@Service
public class ApproveService implements IApproveService {
	@Autowired
	private ApproveMapper approveMapper;
	@Autowired
	private CApproveMapper CApproveMapper;
	@Autowired
	private ApproveDao approveDao;
	/**
	 * 根据id删除approve
	 */
	@Override
	public int deleteByPrimaryKey(Integer id) {
		
		return approveMapper.deleteByPrimaryKey(id);
	}
	/**
	 * 选择字段插入approve
	 */
	@Override
	public int insertSelective(Approve approve) {
		
		return approveMapper.insertSelective(approve);
	}
	/**
	 * 根据id查询approve
	 */
	@Override
	public Approve selectByPrimaryKey(Integer id) {
		
		return approveMapper.selectByPrimaryKey(id);
	}
	/**
	 * 选择字段修改approve
	 */
	@Override
	public int updateByPrimaryKeySelective(Approve approve) {
		
		return approveMapper.updateByPrimaryKeySelective(approve);
	}
	//---------------------------custom-----------------------------
	/**
	 * 获取所有project所有信息,未使用
	 * 分页查询
	 */
	@Override
	public Page findPageApproves(Page page) {
		
		return approveDao.findPageApproves(page);
	}
	/**
	 * 获取所有project所有信息,未使用
	 */
	@Override
	public List<Map<String, Object>> selectprojectallinfo() {
	
		return CApproveMapper.selectprojectallinfo();
	}
	/**
	 *approve 审批表分页查询的方法 
	 * 
	 */
	@Override
	public Page findPageAprrovesinfo(Page page) {
		return approveDao.findPageAprrovesinfo(page);
	}

	
}
